package badugaserver;
/**
 * @author Wojtek N., Kamil M.
 * @version 0.7
 * Exception class for badugi project.
 */
public class BadugaExceptions extends Exception 
{
	private static String[] thrownErrors = {"Invalid value of allPlayers; may be only between 2 and 6!", 
											"StartingTokens cannot be smaller than 100 nor bigger than 999!", 
											"Player have to little money to continue playing!", 
											"Invalid operation!",
											"Error. SuitID may be only between 1-4 and RankID may be only between 1-13",
											"Invalid startingTokens/smallBlind/bigBlind value. They must be in such an order: startingTokens > bigBlind > bigBlind.",
											"Small and big blind can be only a 2 digit value (10<x<99)!"};
	private int errorID;

	/**
	 * @param n index of error message.
	 */
	public BadugaExceptions(int n) 
	{
		errorID = n;
	}

	@Override
	public String getMessage()
	{
		return thrownErrors[errorID];
	}
}
